package db.test.migration;

import org.flywaydb.core.api.migration.BaseJavaMigration;
import org.flywaydb.core.api.migration.Context;

import java.sql.PreparedStatement;

/**
 * 基于Java代码的迁移案例1
 */
public class V8__20220823_add_person extends BaseJavaMigration {
    @Override
    public void migrate(Context context) throws Exception {
        try (PreparedStatement statement =
                     context
                             .getConnection()
                             .prepareStatement("INSERT INTO PERSON (ID,name) VALUES (11,'Obelix')")) {
            statement.execute();
        }
        System.out.println("demo");

    }
}
